<?php /* Smarty version 2.6.26, created on 2018-07-25 14:04:45
         compiled from E:%5CWWW%5C40.125.208.171%5Cvweb/member%5Ctemplates/buy/index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'import', 'E:\\WWW\\40.125.208.171\\vweb/member\\templates/buy/index.html', 1, false),array('function', 'uqcms', 'E:\\WWW\\40.125.208.171\\vweb/member\\templates/buy/index.html', 30, false),array('modifier', 'img_size', 'E:\\WWW\\40.125.208.171\\vweb/member\\templates/buy/index.html', 53, false),)), $this); ?>
<?php echo $this->_plugins['function']['import'][0][0]->import(array('file' => "index/header.html",'title' => "订单列表"), $this);?>
 
<link rel="stylesheet" type="text/css" href="<?php echo $this->_tpl_vars['__APP__']; ?>
public/css/order.css">
<div class="tab"><span>我的订单</span></div>
<div class="lbox"> 
	<div class="con_tab">
		<a href="?m=buy" <?php if ($_GET['status'] == ''): ?>class="ch"<?php endif; ?>>订单列表</a> 
		<a href="?m=buy&status=1" <?php if ($_GET['status'] == '1'): ?>class="ch"<?php endif; ?>>待付款</a> 
		<a href="?m=buy&status=2" <?php if ($_GET['status'] == '2'): ?>class="ch"<?php endif; ?>>待发货</a> 
		<a href="?m=buy&status=3" <?php if ($_GET['status'] == '3'): ?>class="ch"<?php endif; ?>>待收货</a> 
		<a href="?m=buy&status=4" <?php if ($_GET['status'] == '4'): ?>class="ch"<?php endif; ?>>交易结束</a> 
		<?php if ($_GET['a'] == 'comment'): ?>
			 <em>|</em><a href="javascript:;" class="ch">购买评论</a>  
		<?php endif; ?> 
	</div> 
	<table width="100%">
		<thead>
			<tr>
				<th>商品名</th>
				<th width="80">单价</th>
				<th width="60">数量</th>
				<th width="120">售后维权</th>
				<th width="80">实付款</th>
				<th width="100">交易状态</th>
				<th width="100">交易操作</th> 
			</tr> 
		</thead> 
		<tbody class="table_line">
			<tr><td colspan="7">&nbsp;</td></tr>
		</tbody>
		<?php echo $this->_plugins['function']['uqcms'][0][0]->load_module(array('m' => 'order','v' => 'data','c' => "order_list:user_type=1&page=smarty.get.page&page_size=20&status=smarty.get.status"), $this);?>

		<?php if ($this->_tpl_vars['data']['list']): ?>
			<?php $_from = $this->_tpl_vars['data']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>	
				<tbody style="border:1px solid #efefef;">
					<tr class="order_tr_top">
						<td colspan="7">
							<span class="order_span" style="padding-right:10px; padding-left:20px;"> 订单号：<?php echo $this->_tpl_vars['i']['order_no']; ?>
</span> 
							<span class="order_span" style="padding-right:10px;"><?php echo $this->_tpl_vars['i']['addtime']; ?>
</span>
							<span class="order_span">店铺：<a href="index.php?m=shop&id=<?php echo $this->_tpl_vars['i']['shop_id']; ?>
" target="_blank"><?php echo $this->_tpl_vars['i']['shop_name']; ?>
</a></span>
							<?php if ($this->_tpl_vars['i']['otype'] == '2'): ?> 
								<span style=" margin:11px 0 0 20px; background:#f00; color:#fff; float:left;">拼团订单</span>
							<?php endif; ?>
							<?php if ($this->_tpl_vars['i']['order_status'] == '0' || $this->_tpl_vars['i']['order_status'] == '4' || $this->_tpl_vars['i']['order_status'] == '5'): ?>
								<a href="?m=buy&a=del_order&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
" class="order_del" onclick="del()">删除</a>
							<?php endif; ?> 
						</td>
					</tr>
				<?php $_from = $this->_tpl_vars['i']['glist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['g']):
?>
					<tr class="order_tr">
						<td style="border-top:1px solid #efefef;">
							<div class="gcon">
								<div class="img">
									<a href="index.php?m=goods&a=detail&id=<?php echo $this->_tpl_vars['g']['gid']; ?>
" class="order_img" target="_blank">
										<img src="<?php echo $this->_tpl_vars['__IMG__']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['g']['images'])) ? $this->_run_mod_handler('img_size', true, $_tmp, '80x80') : $this->_plugins['modifier']['img_size'][0][0]->img_size($_tmp, '80x80')); ?>
" width="80">
									</a>
								</div>
								<div class="desc">
									<div class="ttl">
										<a href="index.php?m=goods&a=detail&id=<?php echo $this->_tpl_vars['g']['gid']; ?>
" class="order_title" target="_blank"><?php echo $this->_tpl_vars['g']['title']; ?>
</a>
									</div>
									<div class="sku">
										<?php if ($this->_tpl_vars['g']['sku']): ?>	
											<?php $_from = $this->_tpl_vars['g']['sku']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['s']):
?>		
												<span><?php echo $this->_tpl_vars['s']['0']; ?>
 : <?php echo $this->_tpl_vars['s']['1']; ?>
 &nbsp;&nbsp; </span> 
											<?php endforeach; endif; unset($_from); ?>
										<?php endif; ?>
									</div>
								</div> 
							</div>	
						</td>
						<td><div class="buy_pr"><span>¥ <?php echo $this->_tpl_vars['g']['price']; ?>
</span></div></td> 
						<td><?php echo $this->_tpl_vars['g']['buy_num']; ?>
</td> 
						<td style="border-right:1px solid #efefef;">
							<?php if ($this->_tpl_vars['i']['order_status'] >= 2): ?>
								<a href="?m=buy&a=refund_detail&service_id=<?php echo $this->_tpl_vars['g']['service_id']; ?>
">维权售后</a>
							<?php endif; ?>
						</td>
					<?php if ($this->_tpl_vars['k'] == '0'): ?>
						<td style="border:1px solid #efefef;" rowspan="<?php echo $this->_tpl_vars['i']['span']; ?>
" valign="top">
							<p class="total_price">￥<?php echo $this->_tpl_vars['i']['total_price']; ?>
</p>
							<?php if ($this->_tpl_vars['i']['express_price'] > '0.00'): ?><p style="font-size:12px; color:#999999;">运费 <?php echo $this->_tpl_vars['i']['express_price']; ?>
</p><?php endif; ?> 
							<?php if ($this->_tpl_vars['i']['promote_price'] > '0'): ?><p style="font-size:12px; color:#999999;">优惠 <?php echo $this->_tpl_vars['i']['promote_price']; ?>
</p><?php endif; ?>
						</td>
						<td style="border:1px solid #efefef;" rowspan="<?php echo $this->_tpl_vars['i']['span']; ?>
" valign="top"> 
							<span style="padding:2px 10px;"><?php echo $this->_tpl_vars['i']['order_status_cn']; ?>
</span><br> 
							<a href="?m=buy&a=detail&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
" style="color: #FF0000; line-height:26px;">订单详情</a>
						</td>
						<td style="border:1px solid #efefef;" rowspan="<?php echo $this->_tpl_vars['i']['span']; ?>
" valign="top">  
							<p style="padding:5px 0 0 0; text-align:center;">
								<?php if ($this->_tpl_vars['i']['order_status'] == '1'): ?>
									<a href="?m=buy&a=pay_trade&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
" target="_blank" class="button_do">付款</a><br>
									<a href="javascript:;" class="cancel_order" onClick="cancel_order('取消订单','?m=buy&a=cancel_order&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
')">取消订单</a>
								<?php elseif ($this->_tpl_vars['i']['order_status'] == '2'): ?>
									<span>等待发货</span>
								<?php elseif ($this->_tpl_vars['i']['order_status'] == '3'): ?>
									<a href="?m=buy&a=detail&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
" class="button_do">确认收货</a><br>
								<?php elseif ($this->_tpl_vars['i']['order_status'] == '4'): ?>
									<a href="?m=buy&a=comment&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
">商品评价</a>
								<?php elseif ($this->_tpl_vars['i']['order_status'] == '5'): ?>	
									<a href="javascrip:;">交易结束</a><br>
									<a href="?m=buy&a=comment&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
">查看评价</a> 
								<?php elseif ($this->_tpl_vars['i']['order_status'] == '8'): ?> 
									<!--拼团，交易成功直接变成6，拼团成功变成2-->
									 <a href="index.php?m=goods&a=share&share_id=<?php echo $this->_tpl_vars['i']['share_id']; ?>
">拼团分享</a> 
								<?php else: ?>
									 <a href="javascrip:;">交易关闭</a> 
								<?php endif; ?>
							</p>
						</td> 
					<?php endif; ?>
					</tr>
				<?php endforeach; endif; unset($_from); ?> 
				</tbody>  
				<tbody class="table_line"><tr><td colspan="7">&nbsp;</td></tr></tbody>
			<?php endforeach; endif; unset($_from); ?>
				<?php if ($this->_tpl_vars['data']['page']): ?>
				<tbody class="table_line">
					<tr><td colspan="7"><div class="page"><?php echo $this->_tpl_vars['data']['page']; ?>
</div></td></tr>
				</tbody>
				<?php endif; ?>
			<?php else: ?>
				<tbody class="table_line">
					<tr><td colspan="7"><div class="nomsg"><i></i><span>最近没有订单哦~</span></div></td></tr>
				</tbody>
			<?php endif; ?>  
		</tfoot> 
	</table>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
<script type="text/javascript"> 
function cancel_order(name,url){
	ajax_dialog(name, url, 350, 50); 
} 
</script>